﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Sportsbook.CouchbasePersistence.JsonConverters;
using Sportsbook.Domain.Models.BetSlips;

namespace Sportsbook.CouchbasePersistence.Models.BetSlips
{
    public class BetSlip : IBetSlip
    {
        public BetSlip()
        {
            Tickets = new List<ITicket>();
        }

        [JsonProperty(PropertyName = "creation_time")]
        public DateTime CreationTime { get; set; }

        [JsonProperty(PropertyName = "type")]
        public string Type
        {
            get { return "bet-slip"; }
            set { }
        }

        [JsonConverter(typeof(JsonListConverter<ITicket, Ticket>))]
        [JsonProperty(PropertyName = "tickets")]
        public List<ITicket> Tickets { get; set; }
    }
}
